package com.leyuangame.dao.repository.jpa;

import com.leyuangame.dao.repository.jpa.user.PlayUser;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface PlayUserRepository extends JpaRepository<PlayUser,String> {
    //查询用户名称包含username字符串的用户对象
    List<PlayUser> findPlayUserByUsername(String username);

    //获得单个用户对象，根据username和pwd的字段匹配
    PlayUser getPlayUserByUsernameIsAndPasswordIs(String username,String password);

    //精确匹配username的用户对象
    PlayUser getByUsernameIs(String username);

    PlayUser findPlayUserByMobile(String mobile);

    PlayUser findPlayUserByMobileAndPassword(String s,String passwd);

    PlayUser findPlayUserByToken(String token);
}
